using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace Pg.BioMedics.RatObserver.Gui.Packaging
{
    internal class TempVideoReference : IDisposable
    {
        #region Fields

        private string _fileName;

        #endregion

        #region Constructors / destructors

        internal TempVideoReference(string fileName)
        {
            _fileName = fileName;
        }

        ~TempVideoReference()
        {
            Dispose();
        }

        #endregion

        #region Properties

        internal string FileName
        {
            get
            {
                return _fileName;
            }
        }

        #endregion

        #region IDisposable Members

        public void Dispose()
        {
            if (File.Exists(_fileName))
            {
                File.Delete(_fileName);
                _fileName = String.Empty;
            }
        }

        #endregion
    }
}
